<template>
<<<<<<< HEAD
    <div class="home">
        <div class="homediv1">
            <van-notice-bar left-icon="volume-o" :scrollable="false">
                <van-swipe
                        vertical
                        class="notice-swipe"
                        :autoplay="3000"
                        :show-indicators="false"
                >
                    <van-swipe-item v-for="data in noticeData">{{data.notice_desc}}</van-swipe-item>
                </van-swipe>
            </van-notice-bar>
        </div>
        <div class="homediv2">
            <div class="data-wrap">{{getYearMonth}}</div>
        </div>
        <div class="swip-image">
            <van-swipe :autoplay="3000">
                <van-swipe-item>
                    <!--<img v-lazy="image"/>-->
                    <img style="width: 100%;height: 210px" src="../assets/wuye4.jpg"/>
                </van-swipe-item>
                <van-swipe-item>
                    <!--<img v-lazy="image"/>-->
                    <img style="width: 100%;height: 210px" src="../assets/wuye1.jpg"/>
                </van-swipe-item>
                <van-swipe-item>
                    <!--<img v-lazy="image"/>-->
                    <img style="width: 100%;height: 210px" src="../assets/wuye2.jpg"/>
                </van-swipe-item>
                <van-swipe-item>
                    <!--<img v-lazy="image"/>-->
                    <img style="width: 100%;height: 210px" src="../assets/wuye3.jpg"/>
                </van-swipe-item>
            </van-swipe>
        </div>
        <van-divider
                :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }"
        >
        </van-divider>
        <div class="title">
            <h4>朗润居小区欢迎您</h4>
        </div>
        <div class="call-me">
            <van-icon name="phone-o"/>
            <span>联系我们</span>
        </div>
        <van-contact-card type="edit" name="朗润居小区物业人员" tel="13000000000" :editable="false"></van-contact-card>
    </div>
</template>

<script>
    import Vue from 'vue';
    import {Lazyload} from 'vant';
    import {ContactCard, ContactList, ContactEdit} from 'vant';

    Vue.use(ContactCard);
    Vue.use(ContactList);
    Vue.use(ContactEdit);
    Vue.use(Lazyload);
    export default {
        name: "Home",
        // inject:['reload'],
        components: {},
        data() {
            return {
                notice: {
                    notice_id: 0,
                    notice_role: 0,
                    notice_desc: "11111111111111111111111111111111111111111111111111"
                },
                images: [
                    '../assets/wuye1.jpg',
                    '../assets/wuye2.jpg',
                    '../assets/wuye3.jpg',
                    '../assets/wuye4.jpg',
                ],
                noticeData: [],
            };
        },
        methods: {
            //    获取所有通知
            getNoticeDataList() {
                axios.get("/safty/notice/getNoticeDataList")
                    .then(res => {
                        if (res.success) {
                            console.log(res);
                            this.noticeData = res.data;
                        }
                    })
                    .catch(err => {

                    })
            }
        },
        mounted() {
            // this.reload();
            this.getNoticeDataList();
        },
        computed: {
            getYearMonth() {
                let t = new Date();
                let month = t.getMonth() + 1;
                return t.getFullYear() + "年" + month + "月" + t.getDate() + "日";
            }
        }
    };
</script>
<style scoped>
    .swip-image {
        margin-top: 30px;
        margin-bottom: 10px;
    }

    .home {
        display: flex;
        flex-direction: column;
        /*background-color:;*/
    }

    .homediv1 {
        margin-top: 10px;
        width: auto;
        height: 40px;
        color: #fff;
        background-color: #dddddd;
        line-height: 40px;
    }

    .title {
        height: 40px;
    }

    .call-me {
        display: flex;
        justify-content: left;
        flex-direction: row;
        align-items: center;
        margin-top: 25px;
        margin-left: 10px;
    }

    .homediv2 {
        margin-top: 10px;
        display: flex;
        width: auto;
        height: 40px;
        line-height: 40px;
    }


    .homediv3 {
        /*让他铺满剩余的所有的空间*/
        flex: 1;
        /*float: left;*/
        /*margin-left: 5%;*/
        /*width: 90%;*/
        /*background-color: #DDDDDD;*/
        /*margin-top: 2%;*/
    }

    .notice-swipe {
        height: 40px;
        line-height: 40px;
    }

    .homediv3-1 {
        display: flex;
        float: left;
        background-color: #eeeeee;
        margin-top: 2%;
        margin-left: 2.5%;
        width: 30%;
        height: 100px;
    }
=======
  <div class="home">
    <div class="homediv1">QUALITY HOME SERVICE</div>
    <div class="homediv2">
      <div class="data-wrap">{{getYearMonth}}</div>
    </div>
    <!--<van-collapse v-model="activeNames">-->
        <!--<van-collapse-item title="标题1" name="1">内容</van-collapse-item>-->
        <!--<van-collapse-item title="标题2" name="2">内容</van-collapse-item>-->
        <!--<van-collapse-item title="标题3" name="3" disabled>内容</van-collapse-item>-->
      <!--</van-collapse>-->
  </div>
</template>

<script>
export default {
  name: "Home",
  // inject:['reload'],
  components: {},
  data() {
    return {
      notice: {
        notice_id: 0,
        notice_role: 0,
        notice_desc: "11111111111111111111111111111111111111111111111111"
      }
    };
  },
  mounted(){
      // this.reload();
  },
  computed: {
    getYearMonth() {
      let t = new Date();
      let month = t.getMonth() + 1;
      return t.getFullYear() + "年" + month + "月" + t.getDate() + "日";
    }
  }
};
</script>
<style scoped>
.home {
  display: flex;
  flex-direction: column;
  /*background-color:;*/
}
.homediv1 {
  margin-top: 10px;
  width: auto;
  height: 40px;
  color: #fff;
  background-color: #dddddd;
  line-height: 40px;
}
.homediv2 {
  margin-top: 10px;
  display: flex;
  width: auto;
  height: 40px;
  line-height: 40px;
}
.homediv3 {
  /*让他铺满剩余的所有的空间*/
  flex: 1;
  /*float: left;*/
  /*margin-left: 5%;*/
  /*width: 90%;*/
  /*background-color: #DDDDDD;*/
  /*margin-top: 2%;*/
}
.homediv3-1 {
  display: flex;
  float: left;
  background-color: #eeeeee;
  margin-top: 2%;
  margin-left: 2.5%;
  width: 30%;
  height: 100px;
}
>>>>>>> 70f7e19d6da4b30f0412d394b1171a015e63af36
</style>
